<?php
/**
 * 公司简介更新到数据库
 * User: wuz
 * Date: 2016/8/17
 * Time: 22:25
 */
header("content-type:text/html;charset=utf-8");
include "../Mysql/MySqlClass.php";
$MySQL = new Ycf\Lession\MySqlClass\MySqlClass('jinling_company', 'root', '123456');
session_start();
$admin                     = $MySQL->select("admin", $where = array('adminName' => $_SESSION['userName']));
$companyIntroductionDate   = date('y-m-d h:i:s', time()); //当前的编辑时间
$companyIntroductionUpdate = array(
    'companyIntroductionContent' => $_POST['content'],
    'companyIntroductionDate'    => $companyIntroductionDate,
    'adminId'                    => $admin['id'],
);
$MySQL->update("company_introduction", $companyIntroductionUpdate, $where = array('id  ' => '1'));
header("Location:../aboutUs.php");
